improve design of bitslot
add include assert.h