queue operations
refactoring