Synthesis and investigation of biological and pharmacological activities of benzofuran and benzothiophene derivatives