implement using priority(heap), easy, good