update check() method