replaced 8 by BITS_PER_BYTE