search with hashtable and LimitPriorityQueue