add comment
1st version
add test cases
correct bug