update fixes for pull request #31

updated based on d.newtons suggestions