add different button according to the event
add some documentation