code for the decorrelation project