added several test cases.