added edit and update to controller and views