added buffer_newevents to example