don't assume service container in global scope.