def inside loop