adjusts boolean logic