updated examples to use global_context