modified analysis script