I prefer put this into handleEvent.