using dependency injection