Add $loop var into framework.