CS_TBL #1 I'd use => and <= instead of > and < as one typically gives an area in which to check. The borders of such an area (e.g. the pixels on the edge of the area) count as well then.