updated docs and bug fixes