updates api docs and fixes #4