write document for gem