small refactor on local check