implement heap
add printout of heap and testing function