Adding the update functionality