Finish server-side rate function