Created a first working example with event