implemented variablepriorityqueue, passes unit tests