added check for service existence