use cartesian product generator instead of chain of iterators
rename variable
remove debug line