slightly shorter after gzip
combine two listeners into one, inline function that is only used once