wrap chained comparisons to make code easier to read