added a csv export option