testing invariance properly works