debuged demo for invariance covariance