Tested and corrected BST