now with dependency injection