Updating function workings