updated docs and added examples on API section