delivery: major refactor