corrected search script