Added Input event handler