Added an update method