the realization of binary tree