more documentation, new cartesian product function