wip.  does not pass borrowck yet.