doc + tests