refactored IO to io