finish baum-welch algorithm.