work in progress -- speed up the expectation maximization