implemented and unit tested BinaryHeap