addressing issues raised in #194

**NOT READY FOR MERGE**, still working on this