added global variables from example