more flexible better demo.html