update check function.