before adding global vars