moving method_arity to Utils