more untested work on #49 -- I'm on a plane and don't have internet access, so I can't test right now