code copied into DeliveryPrototype