updated edit in controller