clear code and update doc