doc strings and unit tests