performance update
Merge pull request #2 from d13/master

Performance update on loops