update doc and code