improved unit test cases