attempt use dependency injection for test