map fix, made variables global