updated after comments from pull request