added doc + tests