modified for kernel 3.2