added global variable support