demo code for listeners part 1