fix test, and add some doc-strings