Added binary search part