search 2d matrix.