assertion refactoring