Replace the old foreach trick with the new addmagazines