transpose matrix at first before correlation function