refactored gen_truth_table() (now create_truth_table())