improve api and docs