search in 2D matrix