printing to doc if use flush() method. added loop for paragraph