finished corr implementation, much simpler now