Added the example and JS api