adapt global variables