implemented edit and update using partials