Using globals for patching