switched to globals for stuffs