added some unit tests.