docs and unit tests