create hash from array of ratings