find element in sorted matrix