merging changes from from pull request #213