integrated my sophomore year's analysis.py