find median in BST