Change function in controller