added infile.seek, but needs working