refactored controller spec