refactoring io drivers