finally delete the global function