"going through global variables and if else functions"