update doc, finish code