modified so that user must specify input file