add listen function to save from dead code elimination.
update example.