reduced time by moving lowercase conversion into kernel and bitwise