added global variables to go script. removed some stuff from the python script that seem unnecessary