Add moments function
remove the compile warnings
Merge pull request #568 from bitwangyaoyao:2.4_moments