updated IO to do strings correctly