tweaked the quotation IF to take into account rejected orders