correct update functionality