very due for some refactoring but rename delivery based on type