TedmondH - added rating logic