simplified calculation in kernel: better performance