Added M step with log likelihood computation