script to summarize stats data