Added discount factor to task 16.