fully functioning heap