changes made based on comments in pull request