efficient diagonal line check
efficient diagonal line check