updated functions to make corr_mats