Solution for the dependency injection exercise