rudimentary heap primitives working