refactor builtin functions.