refactors controller spec