debugging...
add simplifying subroutines to heap implementation