Using  service and dependency injection