Added binary search in pair arrays.