prepared scripts for search functionality