csv export working properly