variable arity and better printing