rearrange b_search