isIn now uses only two points