updated differentiation and searching