gmm optimization