Simplified utilities.transform and added test