Added generation of 3tuples