updated beta all to vectorize, not pairwise functions