Add variable length loops