add firstbits and tests