removed extra end in controller