refactor sorting of user queue_items to method