made queue generic
made priority queue generic