add beginning of heap implementation