update functionality works