fix and start heap implementation