update functionality now works