Added modified analysis script for version 3.1