boolean logic should be AND rather than OR