update code and doc

update code and doc