booleans: corrected outsideRanges function