finished up the rewards part of the MDP in the example