priority queue implemented, and some tests