Reading in a text file and pick out and use information from it