more refactoring on the assertions