Added code for spatial correalation and hypothesis testing