add view event handler