updated test for global $ to be more explicit