demo code for the js libs