Formatting the document