based search script implemented