update and add test cases