changes from pull request #16