validate BST reimpl