refactoring assert message