Add edit and update into controller