reimplmented for-loops
Merge pull request #8 from carand/master

reimplmented for-loops