added tests, all tests pass