code now works with multiple input files now need just one output file