Revert "delete funcs"

This reverts commit c0e6e2538476e5c6e633e49a188727d058b698c4.
Revert "delete the use of Global funcs"

This reverts commit 4e61adb8d4656b7dff5dfb9aaeb722ff3c028e1e.
some change