added search term functionality to sample