switching to safe dependency injection style