added get_state_avg.py