separation of concerns using dependency injection