finished analysis.py