corrected BST v2