revised version of PR #154
Merge pull request #731 from opf/feature/pr689

revised version of PR #154