invariance and GMM stuff