added westbook jags analysis function