Define the service before using it