generic binary search