Updated functions with setSearchData functions.