update code for demo pages