remove globals function