Added v4 code- 26 tests passing