add better test code and my own priority queue