applying gmm