cpp multiloops working again