changed how globals are accessed

instead of using globals() to access globals as a dict globals are now
just inferred where appropriate