updated for use with kernel 3.6.11