Updating the fucntion.