added ratings score calculation