order of elements in cartesian product