added functor for binary trees
merged remote