test phase3 (fails)
add some more tests and remove some gratuitous code