Added some code to EventListener.