global variables feractoring