3. before writing doc