unit tests and documentation