setReward method added
Minor change