update docs and code