version 8 with tests; messy
v8 done