Loop over modes