This block of code seems to do (for the ===) the same as the 2 blocks above (for the > and < cases). Can't you change the first 2 blocks to be >= and <= and get rid of this block?