manually merging PR #755 with revisions