create update() method