refactoring/removal of the guard