re-writing csv conversion