Revert "use fancy for loop"

This reverts commit 8fdb03d0311d62a878f6f9122f3e9154bf7f6fbe.