added searching along with binary search algorithm