modified to remove dependancy on local_ratings