switched to !global vars