solves memory exhaustion upon generateCorrelation