extend plugin example by adding events handlers