Add foreach loops