binary tree

use template to realize