some more queue refactoring