revised code from commit a8f38ef as skinner recommended
Merge pull request #109 from lots0logs/testing

revised code from commit a8f38ef as skinner recommended