working csv output