better docs and tests