final revisions. ready for pull request.