write document in detail