Synthesis of heterocyclic compounds of biological interests ring transformation in the oxazole imidazole and thiazole series