[functor] working functor for priority queues