Added function for tuples based trees.