Preparation of optical isomers