nested loop
boolean logic