Failed experiment with global variables