implement basic BIT data structure.