Added code for correlation analysis