gave variables to global variables