remove old import
add priority queue (not tested)