@pradeeban why are all this variables global?