refactor io tests
more refactoring