draft of Heap module