continuation of M-step derivation