adding tests and infrastructure for tests