output file for part D