sample how to use the global varailable