added assert function arity