add scattermat and weighted cov