made kqueue non static