some changes due to change of format of input/output .csv files