binary search with while