always prepare head and body in document