add an example with shiny in readme.md and change js binding to handle dynamic nature