fixes #6 - enforces state in the demo app, as this is best practice