works as expected.  ready to refactor