updated io.py