added tests and a test runner