update analyses1 to use vectorize()