some basic operations with binary tree