Working on median challenge with a tree