working on update functionality