writing tests and documentation