implement update method