test linear/binary search