script for analysis