add global code support