update some script with metatable functions