works.  needs tweaking.