made the discount factor field work, and added testcase