adding binary search algorithm