refactoring for better readability
added interface so a service can be aware of the dispatching process