Removed repetition in controller