write in controller