docs and test working (more or less)