trema event handler filter utilities.