moved globals to globals.py; fixed parallelization