too much logic in controller, try to move to model