fixed priority so that the compare view is processed first
implemented more general code for variable priority queues: supports any number of priorities