implementing update() action