changed discount handling