improving switching (promotion) between local and global variables

hi

improvement: consider making it easier to promote a local variable to global variable and vice versa

thanks