Now using 32 bits to avoid overflows