change document_body to a ternary operator