generating covar matrix fully functional now