added primitive event handlers to make demo interactive