integrate single responsibility principle and dependency injection