FROM STUD TO TRAP SUB Transformation