Added a binary search algorithm