made output file into a parameter