add loops support