Improved events example