docs and tests extended