Calculate trend based on frequency
Update extreme grades
Merge branch 'master' into shahdk