changed way to get input file