making R_det2 test and fixing R_corr2 test
tests and code for Z and Z*