support global variables
add tests