added analyze.py for use in 03-loop