added ruby binary search