played with the reward function - check rewardFlag