binary tree finally implemented