Ethyl cyanoacetate (1a) or its methyl derivatives (1b and 1c) were treated with HCl/EtOH to give the corresponding imidates (2a-2c). Treatment of the latter compounds with cysteamine gave ethyl 2-thiazoline-2-acetate (3a-3c), which by reduction with sodium cyanoborohydride