update check and diff function