More work on corr function