half finished analyze.py