added edit action and update method