re-implement cd9c53c
re-implement cd9c53c  through 6399f04
last of the changes to bring in for the issue_105_fix branch