reformatting event handling