minor changes to discount script