putting everything in outputfile