update docs and add test