Try to implement event handling