add search logic