removed unneeded heapq lib