update docs and bug fixes