Initial commit to update discounting

2nd required pull request for the master branch to implement discounting