modified the demo