refactoring io sources