A first compound is converted to a second compound enzymatically in a solvent mixture containing water and a fluorinated, non-chlorinated alkane, alkene, or alkyne having up to 4 carbon atoms. Lactams, for example 6-aminopenicillanic acid (6-APA), may be prepared by enzymatic conversion of a first compound, for example penicillin-G, in a solvent mixture comprising water and a non-aqueous organic solvent, for example 1,1,1, 2-tetrafluoroethane. The 6-APA can be caused to precipitate, isolated by filtration and optionally derivatized to produce a desired compound. A by-product of the enzymatic conversion, for example phenylacetic acid, can be isolated by solvent extraction, suitably using a solvent which also comprises 1, 1, 1, 2-tetrafluoroethane.