simplify loop.go
Merge pull request #1 from larsmans/simplify

simplify loop.go

Thanks!