added rating function to game