removed max-heap as it was incorrect