trans saving data in the controller