added discount control
Merge branch 'temp'