added json data and global variables