more built-in functions + bug fixes