added no diagonals option.