matrix c done, formated output to csv done