adding some event handlers