clean up loops a little
per issue #13