test and docstring

complet test and add doc