remove globals for testing