adding loops