adjusted search script