Prerequisite for #388 and #390 also resolves #160
Prerequisite for #388 and #390
also resolves #160