added BitReader and BitWriter