reverting back, seems to cause problems with the priority queue running out of the heap space