optizmize by using unsigned char instead of unsigned int, linting