modified to comply with  kernel coding style