preserve beginning and end of document
updated documentation