* implemented the update() method