Adding reward
Adding endState