added js functionality to demo