improve nearest_ij
carefully use conceal