Some changes in the controller