Add an simpler implementation for catesian product.