implement dependency injection