fixed variables in CartesianProductTerm3
added RichCartesianProductTerm3