set search functionality