corrected typo. added as_io method