made changes based on comments in pull request.