doc and tests