added validation of binary search tree