more vectorized calculations for Baum-Welch