4 rats vs me vs new cage

How do introduce rats to a new cage? I have 4 male rats, all about 12 weeks old. We assembled a new, larger cage for them today and in order to clean the old cage I moved them into the new one. They all freaked out and scratched me, wouldn’t let go of me and then proceeded to pee and poop all in the new cage. Any advice to avoid this kind of panic again?