prevent diagonals in from(x,y)