refactoring assertions