this is not the way.
appears to work. needs unit tests