add document and some improved