initial version for search 2d matrix