refactoring for controller specs