adds searching functionality