add arity check