changed the way the progrom reads through the file