updated self-pipe example to global_context