fixed threeNotInTopRow function