refactoring queue_items_controller