find element in 2D matrix