refactor delivery