modified viewevent and editevent