updated doc and added picture of the JS interface