refactor event listeners to have similar interfaces