remove duplication in manual_document_builder.rb