create an onChange event handler

Issue #1 resolved