modify logic
add test case