added input file reading