condensed numeric comparisons into one constructor