refactoring for check situations