Added duplicateOrder function