modify example.py to output csv