Event handler now closure to preserve state between calls