Refactor deliver method