but global variables are manipulated by several asynchronous calls