add test doc
update the code