add tests and test infrastructure