modifications made based on discussion in pull request