added discount funciton