Modified demo.js