fix function arity