added new methods for binary tree