copy of "res_reader_1.py"