make the demo code more readable