fix event handlers
add require