update doc and hist