add kqueue and timer