made a number of changes in response to chris's comments on the pull
request