working on view event logic