the boolean logic could be made more readable too
the boolean logic could be made more readable too