implemented priority queue methods except resize