edited for newer kernel (tested on [3.14.0])