get first test sorta working, lots of bug fixes