incorporate suggestions from github pull request