made reading in files somewhat more streamlined