add some modifications
add test cases