update doc, bugs corrections