Optimised performance with loop counter
Merge branch 'master' of github.com:astromaddie/commloop