change checkBits to static