finish setValue function
add unit test