changes suggested in comments to pull request #4