add update functionality