make json a global variable