moved global variable in it's own js file