simplify lib and update doc