updated search box functionality