use heapq instead list
add todo
add implementations with different datastructure