global is added to the anonymous function