refactor Queue Controller