Started to implement event handling