corrected a serious bug in GM creation and added output of sample covariance for testing