refactor io tests