Update demo.js

Added missing functions