adding support for calculating average rating
moving average calculation outside of rails and updating sub average from controllers