refactoring: assertions