Improved the demo hook example.