Revert "Rearranging the massive loop"

This reverts commit 2b02febddc69e68e8510feac5c78fc4d0b697ade.