Synthesis, characterization and evaluation of some heterocyclic compounds as a potential therapeutic agents