modify search script and thumbnail generating