added use of a pointer to ensure exception to demo problem more clearly