modified clickhandler sample
added export support