adding updated discount script and test script