frequency-correlation value

- add function to estimate the frequency-correlation value
- fix some small bugs
I guess this lien can be removed.