seems to work.  starting to refactor stuff