replace GLOBAL variable with cookie usage