added binary tree functions