wrote controls_to_transforms function