partially finished massHeap.ml