fix heap implementation and set up comparison code, no timings yet