heap with indices added and tested