adding status function to service definition