wrangling in libevent