find element in matrix