rewrite to be threadsafe and offer more builtins
disclaimer