simple recursive binary search