add functionality for view event and view item