Add loop support
Merge pull request #1 from HelpinOut/master

Add loop support