made more changes indicated in the pull request