doc and output text