finish cartesian product