working on creating output file