more functions related to expectation maximization