attached the variable data to the global variable 'variables'