flap the BST