add more built-in functions; fix potential crash when defining procedure;