added check tree is binary tree impl