binary search updated