a script for writing a matrix as a csv file added