search sorted mat