improved dependency injection.