handling global variables in the interaction tool