changed application example to deal with BOUNCING event