reference of 2d matrix search