adding docs and tests