make loops more readable
Merge pull request #21 from lipp/daemon-refactor-4

make loops more readable