first pass of almost-working.  :)