implements changes from pull request