Adding update functionality