write comments and documentation