parse input file