Added binary search method.