more refactoring, adding pass/fail report