Added code to get rating