Implemented the Reward function part for the Submod function