SDPIII-78, added code for generating csv