Revert "removing loop"

This reverts commit 87a0e45243b2ef5d539b86618c37ccde87c62365.