documentation and genration of text improved