option documentation and event handling example