reafactor io reader.