Added csv conversion code