made the file-reading from two lines of code to one line