add test cases and comments