add logic to differentiate service provider from service consumer