fix #14
add unit test