improve unit test