added Heap class from example