test global variables and function call