working on update method