improve dependency injection