No but the order he used in comparisons is wrong it should read (x >= y - 3) && (x <= y +3)
PS: Shading automation