added ability to read in input files