wrapping the tag loops in closures