add function.
add test.