added build-in functions + cleanup