fix logic take input search term