fix #3
add a test case