improving the demo script to handle strings starting with }