Extract event handling