Synthetic and mechanistic studies on the preparation of pyridyl-substituted imidazothiazoles