changed globals to require what was I thiking?