generating truth table rows and a column for each variable