script for recalculating rating; new rating formula