DOC Better documentation for the functions