Added custom parameters. Implemented the demo’s logic.