updated API and docs