updates to get this working, including modifying tests.