modify analyze_duration.py