Changed type of is_in_heap
implemeneted is_in_heap with a hashtable as a set