everything works.  needs refactor and further testing.