all necessary changes to BinarySearchTree to make it work with the PriorityQueue