Revert "issue #4: Change in some methods iteration codes from each method to for loop"

This reverts commit 49765e6b055ce48464c32829135fd521d383fe59.