First stab at an automated conversion