Changed quantity to targetQuantity