implemented all tests.