task3a of phase3 and modified task3a of phase2 to generate files for karthik