tweak examples to use service container