First version of binary tree