find element in a sorted matrix