add tests, package doc